package com.shanzmoo.db.store.entity;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.shanzmoo.db.store.entity.vo.StoreStockAllotBillDetailVO;
import com.shanzmoo.db.store.entity.vo.StoreStockAllotBillVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 仓库调拨单明细
 * </p>
 *
 * @author Gzhao
 * @since 2021-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("store_stock_allot_bill_detail")
public class StoreStockAllotBillDetailEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 调拨单id
     */
    private Integer billId;

    /**
     * 商品sku
     */
    private String sku;

    /**
     * 出库仓库编码
     */
    private String outStoreCode;

    /**
     * 入库仓库编码
     */
    private String inStoreCode;

    /**
     * 库存数量
     */
    private Integer skuNum;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 逻辑删除，0-未删除 1-已删除
     */
    private Boolean deleted;

    public StoreStockAllotBillDetailVO toBillDetailVO(){
        StoreStockAllotBillDetailVO target = new StoreStockAllotBillDetailVO();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }

}
